/**
 * 获得鼠标选中的对象
 * 
 * @param this[arrName]
 * @param mouseX
 * @param mouseY
 */
function getClickObject(obj, arrName, mouseX, mouseY)
{
	var _result = null;
	var _this = obj;
	var _array = _this[arrName];
	console.log(_array);
	for ( var i in _array)
	{
		var click_dx = null;
		var click_dy = null;

		if (_array[i][arrName] !== undefined && _array[i][arrName] !== null
				&& _array[i][arrName] instanceof Array
				&& _array[i][arrName].length > 0)
		{
			_result = getClickObject(_array[i], "datas", mouseX, mouseY);
			if(_result !== null)
			{
				break;
			}
		}
		else
		{
			click_dx = mouseX - (_array[i].position.x + _array[i].position.dx);
			click_dy = mouseY - (_array[i].position.y + _array[i].position.dy);
			if (click_dx > 0
					&& click_dx < _array[i].position.w + _array[i].position.dw
					&& click_dy > 0
					&& click_dy < _array[i].position.h + _array[i].position.dh
					&& _array[i].op_state[0] == 0)
			{
				_result = _array[i];
				console.log(_result);
				break;
			}
		}

		// // 鼠标移动地方在本对象中找不到目标，也要去子对象中翻查一遍它们的viewResource
		// else if(this[arrName][i].viewResources !== undefined &&
		// this[arrName][i].viewResources.length > 0)
		// {
		// // 递归
		// _result = getClickObject(this[arrName][i].viewResources, mouseX,
		// mouseY);
		// break;
		// }
	}

	return _result;
}
